package com.bestdreamer.thread_synchronized;

public class Demo1Thread1 extends Thread{

    private final Demo1Task task;

    public Demo1Thread1(Demo1Task task){
        super();
        this.task = task;
    }

    @Override
    public void run() {
        super.run();
        Demo1CommonUtils.beginTime1 = System.currentTimeMillis();
//        task.doLongTimeTask();
        task.doLongTimeTask2();
        Demo1CommonUtils.endTime1 = System.currentTimeMillis();
    }
}
